@layout("/common/_vue_container.html"){
<div id="app" v-cloak v-loading="fullscreenLoading" style="height:100%;">
    <div class="main_content">
        <div v-loading="screenLoading">
            <div class="remind_title2">
                策略文章添加
                <el-button
                        type="primary"
                        size="small"
                        class="product-new-button"
                        v-on:click="toBackList"
                >
                    返回
                </el-button>
            </div>
            <div style="width: 50%">
                <div style="height: 60px;line-height: 60px;font-size: 18px;">文章标题:</div>
                <el-input
                        style="width: 85%"
                        placeholder="请输入标题"
                        v-model="strategyContent.title"
                        clearable>
                </el-input>
                <div style="height: 60px;line-height: 60px;font-size: 18px;">文章类型:</div>
                <el-input
                        style="width: 85%"
                        placeholder="请选择文章类型"
                        v-model="typeName"
                        disabled>
                </el-input>
                <div style="margin: 12px 0">
                    <el-button type="text" v-on:click="selectType()">选择类别</el-button>
                    <el-button type="text" v-on:click="clearType()">清空</el-button>
                </div>
                <div style="height: 60px;line-height: 60px;font-size: 18px;">缩略图:</div>
                <el-radio-group v-model="picType">
                    <el-radio :label="1">大图</el-radio>
                    <el-radio :label="2">组图</el-radio>
                    <el-radio :label="3">小图</el-radio>
                </el-radio-group>
                <div style="height: 14px;"></div>

                <el-upload
                        v-if="picType===1"
                        class="avatar-uploader"
                        action="${ctxPath}/cash/uploadFile"
                        :show-file-list="false"
                        :on-progress="handleAvatarProcess"
                        :on-success="handleAvatarSuccess"
                        :before-upload="beforeAvatarUpload">
                    <img v-if="adImgUrl" :src="adImgUrl" class="avatar">
                    <div v-else>
                        <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                        </el-progress>
                        <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                    </div>
                </el-upload>

                <el-upload
                        v-if="picType===3"
                        class="avatar-uploader"
                        action="${ctxPath}/cash/uploadFile"
                        :show-file-list="false"
                        :on-progress="handleAvatarProcess"
                        :on-success="handleAvatarSuccessSmall"
                        :before-upload="beforeAvatarUpload">
                    <img v-if="adImgUrlSmall" :src="adImgUrlSmall" class="avatar-small">
                    <div v-else>
                        <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                        </el-progress>
                        <i v-else class="el-icon-plus avatar-uploader-icon-small"></i>
                    </div>
                </el-upload>

                <div v-if="picType === 2" style="width: 100%;height: 140px;">
                    <el-upload
                            style="float: left;margin-right: 10px;"
                            class="avatar-uploader"
                            action="${ctxPath}/cash/uploadFile"
                            :show-file-list="false"
                            :on-success="handleAvatarSuccessGroupOne"
                            :before-upload="beforeAvatarUpload">
                        <img v-if="adImgUrlOne" :src="adImgUrlOne" class="avatar-group">
                        <div v-else>
                            <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                            </el-progress>
                            <i v-else class="el-icon-plus avatar-uploader-icon-group"></i>
                        </div>
                    </el-upload>

                    <el-upload
                            style="float: left;margin-right: 10px;"
                            class="avatar-uploader"
                            action="${ctxPath}/cash/uploadFile"
                            :show-file-list="false"
                            :on-success="handleAvatarSuccessGroupTwo"
                            :before-upload="beforeAvatarUpload">
                        <img v-if="adImgUrlTwo" :src="adImgUrlTwo" class="avatar-group">
                        <div v-else>
                            <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                            </el-progress>
                            <i v-else class="el-icon-plus avatar-uploader-icon-group"></i>
                        </div>
                    </el-upload>

                    <el-upload
                            style="float: left;margin-right: 10px;"
                            class="avatar-uploader"
                            action="${ctxPath}/cash/uploadFile"
                            :show-file-list="false"
                            :on-success="handleAvatarSuccessGroupThree"
                            :before-upload="beforeAvatarUpload">
                        <img v-if="adImgUrlThree" :src="adImgUrlThree" class="avatar-group">
                        <div v-else>
                            <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                            </el-progress>
                            <i v-else class="el-icon-plus avatar-uploader-icon-group"></i>
                        </div>
                    </el-upload>
                </div>
                <div style="height: 60px;line-height: 60px;font-size: 18px;">文章段落:</div>
                <div v-for="item in strategyContent.content" style="margin: 20px 0;">
                    <el-input
                            style="width: 85%"
                            type="textarea"
                            :rows="10"
                            placeholder="请输入内容"
                            v-model="item.val">
                    </el-input>
                    <el-button style="width: 10%;margin-left: 10px;" type="text" v-on:click="delParagraph(item)">删除段落</el-button>
                </div>
                <div style="margin: 12px 0">
                    <el-button type="text" v-on:click="addParagraph">新增段落</el-button>
                </div>
                <div style="margin-top: 20px;">
                    <el-button type="primary" v-on:click="saveStrategyInfo()">确 定</el-button>
                </div>
            </div>
        </div>
    </div>

    <el-dialog title="选择文章类型" :visible.sync="dialogTypeVisible" width="60%">
        <el-row>
            <el-button
                    v-for="item in articleTypeList"
                    :key="item.id"
                    style="margin: 10px;"
                    v-on:click="getItemInfo(item.id,item.name)"
            >
                {{item.name}}
            </el-button>
        </el-row>
        <div slot="footer" class="dialog-footer">
            <el-button v-on:click="dialogTypeVisible = false">取 消</el-button>
            <el-button type="primary" v-on:click="confirmGetInfo()">确 定</el-button>
        </div>
    </el-dialog>
</div>
    <script src="${ctxPath}/static/modular/cash/strategy/strategy_add.js"></script>
    @}